<@override name="title">问卷调查</@override>

<@override name="viewbody">
<div class="row">
    <div class="col-md-12">
        <h3 class="page-title">
            问卷调查
            <small>问卷管理列表</small>
        </h3>
        <ul class="page-breadcrumb breadcrumb">
            <li>
                <i class="fa fa-home"></i>
                <a href="${ctx}/admin/home">首页</a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="#">问卷管理</a>
            </li>
        </ul>
    </div>
</div>

<div class="row">
    <div class="col-md-12">
        <div class="portlet box light-grey">
            <div class="portlet-title">
                <div class="caption">
                    <i class="fa fa-globe"></i>问卷一览表
                </div>
            </div>
            <div class="portlet-body">
                <div class="table-toolbar">
                    <div class="btn-group">
                        <a id="sample_editable_1_new" href="${ctx}/admin/vote/vote/create"  class="btn default green-stripe">
                            新增 <i class="fa fa-plus"></i>
                        </a>
                        <a id="sample_editable_1_new" class="btn default yellow-stripe batchdelete" data-action="${ctx}/admin/vote/vote/remove" data-tables="#data-list" data-message="您确认删除所选择的类型信息么？">
                            删除 <i class="fa fa-ban"></i>
                        </a>
                        <a id="sample_editable_1_new" class="btn default red-stripe batchstop" data-action="${ctx}/admin/vote/vote/stop" data-tables="#data-list" data-message="你确定要停用所选择的活动吗？">
                            停用 <i class="fa fa-ban"></i>
                        </a>
                    </div>

                </div>
                <table class="table table-striped table-bordered table-hover" id="data-list">
                    <thead>
                    <tr>
                        <th width="30"><input type="checkbox" name="checkall"></th>
                        <th width="30">序号</th>
                        <th>题目</th>
                        <th width="15%">选项</th>
                        <th width="10%">开始时间</th>
                        <th width="10%">结束时间</th>
                        <th width="5%">次序</th>
                        <th width="8%">状态</th>
                        <th width="8%" class="text-center">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    </tbody>
                </table>
            </div>

        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-12">
        <div class="portlet box yellow">
            <div class="portlet-title">
                <div class="caption">
                    <i class="fa fa-cogs"></i>问卷中南币设置
                </div>
            </div>
            <div class="portlet-body">

                <h5>每次问卷赠送中南币数量：</h5>
                <form class="form-inline" role="form" id="currency_form" method="post" action="${ctx}/admin/vote/vote/currency">
                    <div class="form-group">
                        <div class="input-icon">
                            <i class="fa fa-money"></i>
                            <input type="text" name="currency" class="form-control" id="currency" placeholder="中南币数量" value="${currency!'10'}">
                        </div>
                    </div>
                    <button type="submit" class="btn btn-default">保存修改</button>
                </form>

            </div>
        </div>
    </div>
</div>

<script id="action_template" type="text/x-handlebars-template">

    <div class="table-controls">
        <a href="${ctx}/admin/vote/vote/edit/{{id}}" class="btn default blue-stripe" title="编辑"><i
                class="fa fa-edit"></i></a>
        <a href="javascript:void(0);" class="btn default yellow-stripe" title="删除"
           data-hook="remove-action" data-action="${ctx}/admin/vote/vote/remove?DATA={{id}}">
            <i class="fa fa-trash-o"></i></a>

        {{#if state}}
            <a href="javascript:void(0);" class="btn default red-stripe" title="停用"
               data-hook="stop-action" data-message="你确定要停用该问题吗" data-action="${ctx}/admin/vote/vote/stop?DATA={{id}}">
                <i class="fa fa-eye-slash"></i></a>
        {{else}}
        <a href="javascript:void(0);" class="btn default red-stripe" title="启用"
           data-hook="stop-action" data-message="你确定要启用该问题吗" data-action="${ctx}/admin/vote/vote/run?DATA={{id}}">
            <i class="fa fa-eye"></i></a>
        {{/if}}

    </div>
</script>

<script id="opt_template" type="text/x-handlebars-template">
    <ul class="">
        {{#each opt}}
            <li>{{this}}</li>
        {{/each}}
    </ul>
</script>

</@override>
<@override name="viewmodule">vote</@override>
<@extends name="../../_basic/main.ftl"></@extends>
